import pqrcode.*;

Decoder decoder;
Grid grid;

void setup(){
  // Settings
  size(195,195);
  frameRate(2);

  // QR Decoder
  decoder = new Decoder(this);

  // Game of Life
  grid = new Grid();
  grid.Random();
  grid.Update();
}

void draw(){
  //PImage img = loadImage("qrcode.png");
  //image(img, 0, 0);
  //decoder.decodeImage(img);
  //exit();
  background(255);
  noStroke();
  //grid.Evolve();
  grid.Random();
  grid.Evolve();
  grid.Update();
  grid.Draw();
}

void decoderEvent(Decoder decoder) {
  String statusMsg = decoder.getDecodedString();
  println(statusMsg);
}
